# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Environment do
  @moduledoc """
  Environment represents a user-visible compute infrastructure for analytics within a lake.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Environment creation time.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the environment.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. User friendly display name.
  *   `endpoints` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentEndpoints.t`, *default:* `nil`) - Output only. URI Endpoints to access sessions associated with the Environment.
  *   `infrastructureSpec` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentInfrastructureSpec.t`, *default:* `nil`) - Required. Infrastructure specification for the Environment.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. User defined labels for the environment.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The relative resource name of the environment, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
  *   `sessionSpec` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentSessionSpec.t`, *default:* `nil`) - Optional. Configuration for sessions created for this environment.
  *   `sessionStatus` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentSessionStatus.t`, *default:* `nil`) - Output only. Status of sessions created for this environment.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. Current state of the environment.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System generated globally unique ID for the environment. This ID will be different if the environment is deleted and re-created with the same name.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the environment was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :endpoints =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentEndpoints.t() | nil,
          :infrastructureSpec =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentInfrastructureSpec.t()
            | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :sessionSpec =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentSessionSpec.t() | nil,
          :sessionStatus =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentSessionStatus.t() | nil,
          :state => String.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:endpoints, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentEndpoints)

  field(:infrastructureSpec,
    as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentInfrastructureSpec
  )

  field(:labels, type: :map)
  field(:name)
  field(:sessionSpec, as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentSessionSpec)

  field(:sessionStatus,
    as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EnvironmentSessionStatus
  )

  field(:state)
  field(:uid)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Environment do
  def decode(value, options) do
    GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Environment.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1Environment do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
